import React from "react";
import { hydrateRoot } from 'react-dom/client';
import { BrowserRouter } from "react-router-dom";
import App from "../App";
const root = document.getElementById("root");
import { getClientStore } from "../store"; //浏览器端redux数据
//  console.log(App,'App')
const store = getClientStore(); // 获取服务端redux数据
/* hydrateRoot 函数允许你在先前由 react-dom/server 生成的浏览器 HTML DOM 节点中
*/
hydrateRoot(
  root,
  <BrowserRouter>
    <App store={store}></App>
  </BrowserRouter>
);
